#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
vector<int> arr;
bool check(int i, int j, int k)
{
    if (arr[i] + arr[j] > arr[k])
    {
        return true;
    }
    return false;
}
int main()
{

    arr.resize(6);
    int n = 0;
    cin >> n;
    int empty[3] = { 0 };


    while (n)
    {
        int flag = 0;
        n--;
        for (int i = 0; i < 6; i++) cin >> arr[i];
        sort(arr.begin(), arr.end());
        for (int i = 0; i < 4; i++)
        {
            for (int j = i + 1; j < 5; j++)
            {
                for (int k = j + 1; k < 6; k++)
                {
                    int z = 0;
                    int l = 0;
                    while (z < 6)
                    {
                        if (z != i && z != j && z != k)
                        {
                            empty[l++] = z;

                        }
                        z++;
                    }
                    if (check(i, j, k) && check(empty[0], empty[1], empty[2]))
                    {
                        //cout<<"Yes"<<endl;
                        flag = 1;
                    }

                }
            }

        }
        if (flag) cout << "Yes" << endl;
        else cout << "No" << endl;


    }
    return 0;
}